package com.zhiyou100.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.mapper.BookMapper;
import com.zhiyou100.model.Book;
import com.zhiyou100.service.BookService;
@Service("bookService")
public class BookServiceImpl implements BookService{

	@Autowired
	private BookMapper bookMapper;
	
	public void add(Book book) {
		bookMapper.add(book);
	}

	public void update(Book book) {
		// TODO Auto-generated method stub
		bookMapper.update(book);
	}

	public void deleteById(int id) {
		// TODO Auto-generated method stub
		bookMapper.deleteById(id);
	}

	public List<Book> queryAll() {
		// TODO Auto-generated method stub
		return bookMapper.queryAll();
	}

	public Book queryById(int id) {
		// TODO Auto-generated method stub
		return bookMapper.queryById(id);
	}

}
